/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package GameServer;

/**
 *
 * @author Assaf Miron
 */
public enum eEventsID {
//1.	Game Start – game started
//2.	Game Over – game ended
//3.	Game Winner – the winner of the game (play name will be in the event)
//4.	Player Resigned – Player resigned from game: the client needs to update all the player’s assets as free
//5.	Player Lost - Player lost game: the client needs to update all the player’s assets as free
//6.	Prompt Player to Roll Dice – prompt user to enter dice roll results (with timer)
//7.	Dice Roll (might be generated automatically or after user enters dice roll as well)
//8.	Move – move a Player to a given Square board
//9.	Passed Start Square – just a notification message, a payment message will be sent afterward
//10.	Landed on Start Square – just a notification message, a payment message will be sent afterward
//11.	Go to Jail – just a notification message, move message will be sent afterwards
//12.	Prompt Player to Buy Asset – prompt user to buy asset (with timer)
//13.	Prompt Player to Buy House – prompt user to buy a house (with timer)
//14.	Asset bought message – just a notification message
//15.	House bought message – just a notification message
//16.	Surprise Card – just a notification message, one or more payment messages will be sent afterwards
//17.	Warrant Card – just a notification message, one or more payment messages will be sent afterwards
//18.	Get Out Of Jail Card - just a notification message
//19.	Payment – indicates that an amount of money should be transferred from/to the Player.
//20.	Player used Get out of jail card – just a notification message

    GAME_START(1),
    GAME_OVER(2),
    GAME_WINNER(3),
    PLAYER_RESIGN(4),
    PLAYER_LOST(5),
    PLAYER_ROLL_DICE(6),
    AUTO_DICE_ROLL(7),
    PLAYER_MOVE(8),
    PLAYER_PASS_START(9),
    PLAYER_ON_START(10),
    GO_TO_JAIL(11),
    PROMPT_BUY_ASSET(12),
    PROMPT_BUY_HOUSE(13),
    ASSET_BOUGHT(14),
    HOUSE_BOUGHT(15),
    SURPRISE_CARD(16),
    WARNING_CARD(17),
    GET_OUT_JAIL(18),
    PLAYER_PAY(19),
    PLAYER_USED_GETOUTCARD(20);
    private Integer value;

    private eEventsID(Integer value) {
	this.value = value;
    }

    public Integer get() {
	return value;
    }

    public static eEventsID find(Integer eventID) {
	switch (eventID) {
	    case 1: {
		return GAME_START;
	    }
	    case 2: {
		return GAME_OVER;
	    }
	    case 3: {
		return GAME_WINNER;
	    }
	    case 4: {
		return PLAYER_RESIGN;
	    }
	    case 5: {
		return PLAYER_LOST;
	    }
	    case 6: {
		return PLAYER_ROLL_DICE;
	    }
	    case 7: {
		return AUTO_DICE_ROLL;
	    }
	    case 8: {
		return PLAYER_MOVE;
	    }
	    case 9: {
		return PLAYER_PASS_START;
	    }
	    case 10: {
		return PLAYER_ON_START;
	    }
	    case 11: {
		return GO_TO_JAIL;
	    }
	    case 12: {
		return PROMPT_BUY_ASSET;
	    }
	    case 13: {
		return PROMPT_BUY_HOUSE;
	    }
	    case 14: {
		return ASSET_BOUGHT;
	    }
	    case 15: {
		return HOUSE_BOUGHT;
	    }
	    case 16: {
		return SURPRISE_CARD;
	    }
	    case 17: {
		return WARNING_CARD;
	    }
	    case 18: {
		return GET_OUT_JAIL;
	    }
	    case 19: {
		return PLAYER_PAY;
	    }
	    case 20: {
		return PLAYER_USED_GETOUTCARD;
	    }
	    default: {
		return null;
	    }
	}
    }
}
